#ifndef	_BDBBASE_H_
#define	_BDBBASE_H_

#include <sys/types.h>
#include <iostream>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
#include <db.h>
#define DATABASE	"free.db"
#define DBLOCATE	"./dbfile/"
#define VALUE_SIZE	77

class CBdbBase
{
public:

	CBdbBase(void);

	~CBdbBase(void);
	int insert(int, char*);
	int get(int, char*);

private:
	void	print_error(int);
	void 	init_DBT(DBT*,DBT*);
	int 	del(int);
	DB_ENV* m_p_env;
	DB*		m_p_db;
};

#endif
